package com.chee.plant.hibernate.object.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the plant_feed table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="plant_feed"
 */

public abstract class BasePlantFeed  implements Serializable {

	public static String REF = "PlantFeed";
	public static String PROP_NPC_SELL = "NpcSell";
	public static String PROP_PRICE = "Price";
	public static String PROP_ID = "Id";
	public static String PROP_CROP_LEVEL = "CropLevel";
	public static String PROP_PLANT_ID = "PlantId";
	public static String PROP_DROP_RATE = "DropRate";


	// constructors
	public BasePlantFeed () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BasePlantFeed (java.lang.Integer id) {
		this.setId(id);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BasePlantFeed (
		java.lang.Integer id,
		java.lang.Integer plantId,
		java.lang.Integer price,
		java.lang.Integer npcSell,
		java.lang.Integer cropLevel,
		java.lang.Integer dropRate) {

		this.setId(id);
		this.setPlantId(plantId);
		this.setPrice(price);
		this.setNpcSell(npcSell);
		this.setCropLevel(cropLevel);
		this.setDropRate(dropRate);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Integer id;

	// fields
	private java.lang.Integer plantId;
	private java.lang.Integer price;
	private java.lang.Integer npcSell;
	private java.lang.Integer cropLevel;
	private java.lang.Integer dropRate;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="sequence"
     *  column="id"
     */
	public java.lang.Integer getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.Integer id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: plant_id
	 */
	public java.lang.Integer getPlantId () {
		return plantId;
	}

	/**
	 * Set the value related to the column: plant_id
	 * @param plantId the plant_id value
	 */
	public void setPlantId (java.lang.Integer plantId) {
		this.plantId = plantId;
	}



	/**
	 * Return the value associated with the column: price
	 */
	public java.lang.Integer getPrice () {
		return price;
	}

	/**
	 * Set the value related to the column: price
	 * @param price the price value
	 */
	public void setPrice (java.lang.Integer price) {
		this.price = price;
	}



	/**
	 * Return the value associated with the column: npc_sell
	 */
	public java.lang.Integer getNpcSell () {
		return npcSell;
	}

	/**
	 * Set the value related to the column: npc_sell
	 * @param npcSell the npc_sell value
	 */
	public void setNpcSell (java.lang.Integer npcSell) {
		this.npcSell = npcSell;
	}



	/**
	 * Return the value associated with the column: crop_level
	 */
	public java.lang.Integer getCropLevel () {
		return cropLevel;
	}

	/**
	 * Set the value related to the column: crop_level
	 * @param cropLevel the crop_level value
	 */
	public void setCropLevel (java.lang.Integer cropLevel) {
		this.cropLevel = cropLevel;
	}



	/**
	 * Return the value associated with the column: drop_rate
	 */
	public java.lang.Integer getDropRate () {
		return dropRate;
	}

	/**
	 * Set the value related to the column: drop_rate
	 * @param dropRate the drop_rate value
	 */
	public void setDropRate (java.lang.Integer dropRate) {
		this.dropRate = dropRate;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.chee.plant.hibernate.object.PlantFeed)) return false;
		else {
			com.chee.plant.hibernate.object.PlantFeed plantFeed = (com.chee.plant.hibernate.object.PlantFeed) obj;
			if (null == this.getId() || null == plantFeed.getId()) return false;
			else return (this.getId().equals(plantFeed.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}

private static final long serialVersionUID = 1L; 
}